<script setup lang="ts">
const route = useRoute();
let path = "";
const { data: page } = await useAsyncData(route.path, () => {
  return queryCollection("document").path(route.path).first();
});

console.log("page", page.value);

useSeoMeta({
  title: page.value?.title,
  description: page.value?.description,
});
</script>

<template>
  <ContentRenderer v-if="page" :value="page" />
  <div v-else>Home not found</div>
</template>
